<!DOCTYPE html PUBLIC "">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>NTKO</title>
    <link rel="stylesheet" type="text/css" href="../../themes/bootstrap/cetc54.ui.all.css">

</head>
<body>
<div id="div_office"></div>
</body>
<script type="text/javascript" src="../../lib/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../../release/cetc54.ui.all.js"></script>
<script>
    var div = $('#div_office');
    div.uiOfficeControl({
        cabRoot: '../../lib/ntko/',
        productCaption: '',
        productKey: ''
    });
    var ntko = div.uiOfficeControl('getCab');
    ntko.activate(true);
    ntko.AddCustomMenu2(0, '自定义菜单');
    ntko.AddCustomMenuItem2(0, 0, -1, false, '我的菜单1', false);
    ntko.AddCustomMenuItem2(0, 1, -1, false, '我的菜单2', false);
    ntko.AddCustomMenuItem2(0, 2, -1, false, '我的菜单3', false);
    //兼容firefox、chrome
    ntko.OnCustomMenuCmd2 = function (menuPos, submenuPos, subsubmenuPos, menuCaption, menuID) {
        OnCustomMenuCmd2(menuPos, submenuPos, subsubmenuPos, menuCaption, menuID);
    };
    function OnCustomMenuCmd2(menuPos, submenuPos, subsubmenuPos, menuCaption, menuID) {
        alert("第" + menuPos + "," + submenuPos + "," + subsubmenuPos + "个菜单项,menuID=" + menuID + ",菜单标题为\"" + menuCaption + "\"的命令被执行.");
    }
</script>
<!--兼容IE-->
<script language="JScript" for="div_office-ntko"
        event="OnCustomMenuCmd2(menuPos,submenuPos,subsubmenuPos,menuCaption,menuID)">
    OnCustomMenuCmd2(menuPos, submenuPos, subsubmenuPos, menuCaption, menuID);
</script>

</html>